#ifndef QZEROIMAGE_H
#define QZEROIMAGE_H


#include "qzeromenubar.h"
#include "qzerolayer.h"
#include "qzerocanvas.h"
#include <QKeyEvent>
#include <QMouseEvent>
#include <QGLWidget>
#include <qtimer.h>

class QZeroImage : public QGLWidget
{

  Q_OBJECT

public:
  QZeroImage( QWidget *parent=0);

protected:
  void initializeGL();

  void resizeGL( int width, int height );

  void paintGL();

  void keyPressEvent( QKeyEvent *e );

  void mouseMoveEvent( QMouseEvent * e);

  void mousePressEvent( QMouseEvent * event );

  void mouseReleaseEvent( QMouseEvent * event );

  void handleManipulator(QMouseEvent * e);

  void setLayerProperties();


protected slots:

  virtual void timeOutSlot();

  void updateScene();

private:

  QZeroLayer theLayer_;
  QZeroMenuBar menuBar_;
  void loadGLTextures();
  float zoom_, angle_, xtrans_, ytrans_, alpha_;
  std::string manipmode_, fademode_;
  QTimer *m_timer;







};

#endif // QZEROIMAGE_H
